package com.ct.state.responsity;

import com.ct.state.mapper.StateMapper;
import com.ct.state.model.StateCardModel;
import com.ct.state.model.StateOrderModel;
import com.ct.state.model.StateOsBroswerModel;
import com.ct.state.model.StateProvinceCityModel;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 系统日志 Mapper 接口
 * </p>
 *
 * @author Auto Generator
 * @since 2023-08-17
 */
@Repository
public class StateResponsityImpl  implements IStateResponsity {

    @Resource
    private StateMapper stateMapper;

    /**
     * 统计四个卡片数据信息
     * @param systemId
     * @return
     */
    @Override
    public StateCardModel stateCard(Long systemId){
        return stateMapper.stateCard(systemId);
    }

    /**
     * 统计用户城市占比
     * @param systemId
     * @param type
     * @return
     */
    @Override
    public List<StateProvinceCityModel> statePCData(Long systemId,String type){
        return stateMapper.statePCData(systemId,type);
    }

    /**
     * 统计订单占比
     * @param systemId
     * @param type
     * @return
     */
    @Override
    public List<StateOrderModel> stateOrderData(Long systemId,String type){
        return stateMapper.stateOrderData(systemId,type);
    }

    /**
     * 统计os和浏览器占比
     * @param systemId
     * @param type
     * @return
     */
    @Override
    public List<StateOsBroswerModel> statePlatformData(Long systemId,String type){
        return stateMapper.statePlatformData(systemId,type);
    }
}
